package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Message;
import tech.aistar.mapper.MessageMapper;
import tech.aistar.service.IMessageService;

import java.util.List;


@Service
public class MessageImpl implements IMessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> selectAll(Integer registerId) {
        return messageMapper.selectAll(registerId);
    }

    @Override
    public int deleteById(Integer id) {
        return messageMapper.deleteById(id);
    }

    @Override
    public int updateStateById(Integer id) {
        return messageMapper.updateStateById(id);
    }

    @Override
    public List<Message> selectByState(Integer registerId) {
        return messageMapper.selectByState(registerId);
    }

    @Override
    public int insertAll(Message message) {
        return messageMapper.insertAll(message);
    }
}
